import React, { Component } from 'react';
import { Form, Select } from 'antd';
let FormItem = Form.Item;
const { Option } = Select;
class UrlForm extends Component {
  render() {
    const { getFieldDecorator } = this.props.form;
    const { partId } = this.props;
    return (
      <Form>
        <FormItem label={this.props.name}>
          {getFieldDecorator(`${partId}`, {
            rules: [{ required: true, message: `请输入${this.props.name}` }],
          })(
            <Select placeholder="选择要跳转的图片">
              <Option value="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=94996843,1878572032&fm=26&gp=0.jpg">
                img1
              </Option>
              <Option value="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1125791419,1561105245&fm=26&gp=0.jpg">
                img2
              </Option>
            </Select>,
          )}
        </FormItem>
      </Form>
    );
  }
}
export default Form.create()(UrlForm);
